﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserManageEdit.aspx.cs" Inherits="User_UserManageEdit" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <title>添加管理员</title>
    <link href="../../css/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link href="../../css/admin.css" rel="stylesheet" />
    <script src="../../js/jquery-1.7.2.min.js"></script>
    <script src="../../css/assets/js/bootstrap.min.js"></script>
</head>
<body>
     <form id="form1" runat="server">
        <div>
            <div class="row">
               
                <div class="col-lg-4 col-md-4 col-sm-6 colSpace">
                    <span class="txtWarn">*</span>登录名： 
                    <br />
                    <asp:TextBox runat="server" ID="txtUserName" CssClass="txtSize"></asp:TextBox>
                </div>

                 <div class="col-lg-4 col-md-4 col-sm-6 colSpace">
                    <span class="txtWarn">*</span>账户名： 
                    <br />
                    <asp:TextBox runat="server" ID="txtNickName" CssClass="txtSize"></asp:TextBox>
                </div>

                <div class="col-lg-4 col-md-4 col-sm-6 colSpace">
                    <span class="txtWarn">*</span>手机号：<br />
                    <asp:TextBox runat="server" ID="txtTelphone" CssClass="txtSize"></asp:TextBox>
                </div>

                <div class="col-lg-4 col-md-4 col-sm-6 colSpace">
                    状态：
                    <br />
                    <asp:DropDownList runat="server" CssClass="txtSize" ID="ddlStatus"></asp:DropDownList>
                </div>

                <div class="col-lg-4 col-md-4 col-sm-6 colSpace" runat="server" id="divPwd1">
                    <span class="txtWarn">*</span>密码：<br />
                    <asp:TextBox runat="server" ID="txtPwd1" TextMode="Password" CssClass="txtSize"></asp:TextBox>
                </div>

                <div class="col-lg-4 col-md-4 col-sm-6 colSpace" runat="server" id="divPwd2">
                    <span class="txtWarn">*</span>确认密码：<br />
                    <asp:TextBox runat="server" ID="txtPwd2" TextMode="Password" CssClass="txtSize"></asp:TextBox>
                </div>

                <br />
            </div>
            <div id="menuRight">
                <br />
                权限列表：
                    <div style="padding: 20px; border: 1px solid #D5D5D5;" id="meRight">
                        <asp:Literal runat="server" ID="litMenuList"></asp:Literal>
                    </div>
            </div>
            <div>
                <br />
                <asp:Button runat="server" ID="btnOK" Text="保存" CssClass="btn btn-primary btnSize" OnClick="btnOK_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Label runat="server" CssClass="txtWarn" ID="lblWarn"></asp:Label>
                <input type='hidden' runat="server" id="lblMenuList" />
            </div>
        </div>

        <script>
            //计算checkboxlist高度
            $("#meLeft").height($("#meRight").height());

            //获取权限ID字符串
            function GetMenuIDString() {
                var str = "";
                var menuList = $("#meRight input");
                for (var i = 0; i < menuList.length; i++) {
                    if (menuList[i].checked == true) {
                        str += menuList[i].value + ",";
                    }
                }
                str = str.substring(0, str.length - 1)
                $("#lblMenuList").val(str);
            }

            //绑定权限列表
            function BindMenuList(str) {
                var menuList = $("#meRight input");
                var ls = str.split(",");
                for (var i = 0; i < menuList.length; i++) {
                    for (var j = 0; j < ls.length; j++)
                        if (menuList[i].value == ls[j])
                            menuList[i].checked = true;
                   }
              }
        </script>

    </form>
</body>
</html>
